Skip to main content

Testing in Postman

When it comes to testing our gRPC service the first option we would want, is a visual one, using a tool of sort. There are plenty of options out there but Postman is the go to one, for me. It allow us to:

  • load our proto files and issue gRPC request to the sever.
  • discover the operations with Server reflection

Enabling reflection

This will allow operation discovery from Postman or any other tool that will require it

  • Install Grpc.AspNetCore.Server.Reflection package
builder.Services.AddGrpcReflection();

/// after service mapping
IWebHostEnvironment env = app.Environment;

if (env.IsDevelopment())
{
app.MapGrpcReflectionService();
}

Practice